package com.example.tdam;

import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;

import android.graphics.Bitmap;

public class ContactBean implements Serializable  {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private String name;
	private Map<String, Integer> phoneList;	
	private String[] email;
	private Long contactId;
	private Bitmap contactAvatar;
	private String serviceUserName;
	public void initializeEmailArray(int count)
	{
		this.email = new String[count];
	}
	public String getServiceUserName()
	{
		return this.serviceUserName;
	}
	public void setServiceUserName(String serviceUserName)
	{
		this.serviceUserName = serviceUserName;
	}
	public void setContactAvatar(Bitmap contactAvatar)
	{
		this.contactAvatar = contactAvatar;
	}
	public Bitmap getContactAvatar()
	{
		return this.contactAvatar;
	}
	public void setContactId(Long contactId)
	{
		this.contactId = contactId;
	}
	public Long getContactId()
	{
		return this.contactId;
	}	
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public Map<String, Integer> getPhoneList() {
		if (phoneList == null)
			phoneList = new HashMap<String, Integer>();
		return phoneList;
	}
	public void setEmail(String[] email) {
		this.email = email;
	}
	public String[] getEmail() {
		return this.email;
	}
	public Map.Entry<String, Integer> getFirstAvailablePhone()
	{
		if (phoneList != null)
		{
			return phoneList.entrySet().iterator().next();
		}
		return null;
	}
}
